.graph-model {
  background-color: #fafafc;
  border-right: 1px solid #e9e9e9;
  display: flex;
  flex-direction: column;
  position: relative;
  width: 50%;

  // 节点重命名
  .label-edit {
    position: absolute;
  }

  // 边属性设置
  .edge-attribute-set {
    background-color: #fff;
    box-shadow: rgba(174, 174, 174, 0.5) 0 0 4px;
    padding: 8px 2px 8px 8px;
    position: absolute;

    .edge-attribute-set-content {
      max-height: 250px;
      max-width: 160px;
      min-height: 127px;
      min-width: 120px;
      overflow-x: hidden;
      overflow-y: auto;

      .node-attrs-checkbox {
        background-color: #eff0f7;
        margin-right: 6px;
        padding: 6px;

        .attrs-checkbox-content {
          width: 100%;

          /deep/.ant-checkbox-group {
            width: 100%;

            .ant-col-24 {
              width: 100%;

              .ant-checkbox-wrapper {
                align-items: center;
                display: flex;
                justify-content: left;
                width: 100%;

                >span:last-child {
                  display: inline-block;
                  overflow: hidden;
                  padding: 0 0 2px 6px;
                  text-overflow: ellipsis;
                  white-space: nowrap;
                  width: calc(100% - 18px);
                }
              }
            }
          }
        }
      }

      // 分割线
      .node-attrs-divider {
        border-bottom: 1px solid #efefef;
        height: 1px;
        margin: 6px 0;
        width: calc(100% - 4px);
      }
    }
  }
}

/* 头部信息 功能 icon */
.header {
  align-items: center;
  background-color: #fff;
  border-bottom: 1px solid #e9e9e9;
  display: flex;
  height: 38px;
  justify-content: space-between;
  letter-spacing: 1px;
  padding: 9px 20px;
  width: 100%;

  .title {
    color: #5d637e;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 1px;
    line-height: 20px;
  }

  .tool-list {
    display: flex;

    .graph-model-btn {
      align-items: center;
      border-radius: 2px;
      color: #5d637e;
      cursor: pointer;
      display: flex;
      font-size: 16px;
      margin: 0 4px;
      padding: 6px;
      position: relative;

      &:hover {
        background-color: rgba(105, 115, 255, 0.1);
        color: #6973ff;
      }
    }

    // 禁用
    .prohibit-edit {
      align-items: center;
      border-radius: 2px;
      color: #5d637e;
      cursor: not-allowed;
      display: flex;
      font-size: 16px;
      margin: 0 4px;
      opacity: 0.5;
      padding: 6px;
      position: relative;

      &:hover {
        background-color: rgba(105, 115, 255, 0.1);
      }
    }

    .no-have-stack {
      cursor: not-allowed;
      opacity: 0.4;
    }

    // 选中的使用功能
    .active-current-function {
      //background-color: rgba(103, 113, 252, 0.1);
      color: #6973ff;
    }
  }

  .divider {
    border-right: 1px solid #5d637e;
    height: 16px;
    margin: 6px 4px;
    width: 1px;
  }

}

// tooltip 样式
/deep/.g6-component-tooltip {
  background-color: #fff;
  border: 1px solid #e2e2e2;
  border-radius: 4px;
  box-shadow: rgba(88, 98, 230, 0.2) 0 0 4px;
  color: #545454;
  font-size: 12px;
  padding: 10px 8px;

  ul {
    list-style: none;
    margin: 0;
    padding: 0;

    li {
      color: #5d637e;
      font-size: 14px;
      font-weight: 400;
      height: 22px;
      letter-spacing: 1px;
      line-height: 22px;
      min-width: 70px;
    }

    .tooltip-splider,
    li:first-child {
      border-bottom: 1px solid rgba(217, 217, 217, 1);
      height: 26px;
      margin-bottom: 4px;
      padding-bottom: 4px;
    }

    .current-tag {
      align-items: center;
      display: flex;
      justify-content: space-between;
      position: relative;

      .tag-node-img {
        height: 22px;
        width: 14px;
      }

    }
  }
}

// menu 样式
/deep/.g6-component-contextmenu {
  background-color: #fff;
  border-radius: 4px;
  box-shadow: rgba(0, 0, 0, 0.18) 0 2px 8px;
  padding: 5px 0;

  // 节点 边 menu (ul)
  .node-edge-menu {
    background-color: #fff;
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
    user-select: none;

    // 一级 menu title (li)
    .sub-menu-item {
      color: #5d637e;
      cursor: pointer;
      font-size: 14px;
      font-weight: 400;
      height: 22px;
      letter-spacing: 1px;
      line-height: 22px;
      min-width: 70px;
      padding: 0 12px;
      position: relative;
      user-select: none;

      &:hover {
        background-color: rgba(239, 240, 254, 1);
      }

      // 二级 menu content (div/ul)
      .sub-menu-section {
        background-color: #fff;
        border-radius: 4px;
        box-shadow: rgba(0, 0, 0, 0.18) 0 0 8px;
        display: none;
        left: 125px;
        list-style: none;
        padding: 5px 0;
        position: absolute;
        top: -5px;
        user-select: none;

        // 一级菜单与二级 间隙
        &::before {
          background-color: transparent;
          content: '';
          height: 100%;
          left: -5px;
          position: absolute;
          top: 0;
          width: 5px;
        }

        // 有选择状态的二级菜单 padding-left-18  节点切换标签/边设置方向
        .padding-left-eighteen {
          overflow: hidden;
          padding-left: 18px;
        }

        // 当前选择的项（原点标识）节点切换标签/边设置方向
        .current-status {
          position: relative;

          &::before {
            background-color: #5d637e;
            border-radius: 50%;
            content: '';
            height: 4px;
            left: 8px;
            position: absolute;
            top: 9px;
            width: 4px;
          }

        }
      }

      // 节点切换标签, 边设置方向 二级菜单 (ul)
      .switching-current-item {
        max-width: 160px;
        min-width: 120px;

        li {
          height: 22px;
          letter-spacing: 1px;
          line-height: 22px;
          overflow: hidden;
          padding: 0 12px;
          text-overflow: ellipsis;
          white-space: nowrap;
          width: 100%;
        }
      }

      // 节点/边 设置颜色
      .set-color {
        width: 152px;

        .all-color {
          display: flex;
          flex-wrap: wrap;
          list-style: none;
          padding: 0 0 0 8px;
          width: 100%;

          .color-item {
            border-radius: 50%;
            border-style: solid;
            border-width: 0;
            height: 16px;
            margin: 3px 8px 5px 0;
            width: 16px;

            &:hover {
              border-width: 1px;
            }
          }
        }
      }
    }

    // 一级 menu 节点切换标签/设置颜色, 边设置颜色/设置方向 hover 显示
    .have-sub:hover {
      .sub-menu-section {
        display: block;

        &:hover {
          display: block;
        }

        li:hover {
          background-color: rgba(239, 240, 254, 1);
        }
      }
    }

    // 右侧箭头
    .right-triangle {
      position: relative;

      &::after {
        border-bottom: 4px solid transparent;
        border-left: 4px solid #5e647f;
        border-top: 4px solid transparent;
        content: '';
        height: 0;
        position: absolute;
        right: 12px;
        top: 7px;
        width: 4px;
      }
      // top （行高 - 边框高 ）/ 2   (22 - 8) / 2
    }

    // 节点 menu 第一个 切换标签 分割线
    .first-divider {
      border-bottom: 1px solid #efefef;
      height: 1px;
      margin: 3px auto;
      width: calc(100% - 10px);
    }
  }
}

// 机制选择
.node-edge-tooltip {
  user-select: none;

  li {
    user-select: none;
  }
}

// 图根节点
.graphModelContainer {
  flex: 1;
  overflow: hidden;

  // 给节点添加属性后提示（伪造 tooltip）
  .add-attribute-prompts {
    background-color: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 4px;
    box-shadow: rgba(88, 98, 230, 0.2) 0 0 4px;
    color: #545454;
    font-size: 12px;
    left: 20px;
    padding: 10px 0;
    position: absolute;
    top: 20px;

    .node-edge-tooltip {
      list-style: none;
      margin: 0;
      padding: 0;
      user-select: none;

      li {
        color: #5d637e;
        font-size: 14px;
        font-weight: 400;
        height: 22px;
        letter-spacing: 1px;
        line-height: 22px;
        min-width: 70px;
        padding: 0 8px;
        user-select: none;
      }

      .tooltip-splider,
      li:first-child {
        border-bottom: 1px solid rgba(217, 217, 217, 1);
        height: 26px;
        margin-bottom: 4px;
        padding-bottom: 4px;
      }

      .current-tag {
        align-items: center;
        display: flex;
        justify-content: space-between;
        position: relative;

        .tag-node-img {
          height: 22px;
          width: 14px;
        }
      }

      .add-current-attr {
        background-color: rgba(164, 171, 251, 0.3);
      }
    }
  }
}

// 边属性设置
.scroll-y {
  &::-webkit-scrollbar {
    height: 6px;
    width: 6px;
  }

  &::-webkit-scrollbar-track {
    background: rgb(239, 239, 239);
    border-radius: 2px;
  }

  &::-webkit-scrollbar-thumb {
    background: #bfbfbf;
    border-radius: 6px;
  }

  &::-webkit-scrollbar-thumb:hover {
    background: #888;
  }

  &::-webkit-scrollbar-button {
    background-color: #f1f1f1;
    height: 6px;
    width: 6px;
  }

  &::-webkit-scrollbar-corner {
    background: transparent;
  }
}
